Skip to content

feat: add Docker support and configuration files#55

Open
cg8-5712 wants to merge 7 commits intovnt-dev:v2from
cg8-5712:v2
Open

feat: add Docker support and configuration files#55
cg8-5712 wants to merge 7 commits intovnt-dev:v2from
cg8-5712:v2

Conversation

@cg8-5712
Copy link
Copy Markdown

  • Introduce Dockerfile for building the vnts2 application
  • Add .dockerignore to exclude unnecessary files from Docker context
  • Create docker-compose.yml for easy deployment
  • Update README with Docker usage instructions
  • Add example configuration file for user reference

This commit establishes a Docker-based environment for the vnts2 server, enabling easier deployment and management. It includes necessary configurations for networking and persistence, ensuring a smooth setup process.

Test passed.
image
Requring about 6mins, mainly depends on your hardware.

- Introduce Dockerfile for building the vnts2 application
- Add .dockerignore to exclude unnecessary files from Docker context
- Create docker-compose.yml for easy deployment
- Update README with Docker usage instructions
- Add example configuration file for user reference

This commit establishes a Docker-based environment for the vnts2 server, enabling easier deployment and management. It includes necessary configurations for networking and persistence, ensuring a smooth setup process.
Copilot AI review requested due to automatic review settings April 18, 2026 14:07
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a Docker-based build/runtime setup for the vnts2 Rust server, along with example configuration and updated documentation to support containerized deployment and persisted state.

Changes:

  • Introduces Dockerfile, docker-compose.yml, and .dockerignore to build and run vnts2 with persisted /app/data.
  • Pins the Rust toolchain version via rust-toolchain.toml and the Docker build arg.
  • Adds config.example.toml and substantially expands README documentation (EN + ZH) for configuration and Docker usage.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
Dockerfile Multi-stage build producing a slim runtime image for vnts2.
docker-compose.yml Compose service definition exposing required ports and mounting ./data for persistence.
.dockerignore Reduces Docker build context by excluding repo metadata, build outputs, and runtime artifacts.
rust-toolchain.toml Pins Rust toolchain version for consistent builds (incl. Docker).
config.example.toml Provides a user-facing sample configuration file.
README.md Replaces/expands documentation with configuration + Docker deployment instructions (EN).
README.zh.md Adds full configuration + Docker deployment documentation (ZH).
.gitignore Ignores runtime-generated files and persisted data/logs.
data/.gitkeep Ensures data/ directory exists in the repo for mounting/persistence workflows.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread config.example.toml Outdated
Comment thread README.md
Comment thread README.zh.md
Comment thread Dockerfile
Comment thread docker-compose.yml
- Introduce LoadedConfig struct to encapsulate config loading
- Update load_from to load_with_meta for better error handling
- Log warnings when using default credentials for web auth
- Create default config if it does not exist

This commit improves the configuration loading process by
providing a structured way to handle default values and
logging warnings when defaults are used. It ensures that
users are informed about the configuration state and
encourages them to set custom credentials.
- Introduce `network_secrets` to store secrets for each network code.
- Implement validation for network secrets during registration.
- Update configuration to include `network_secrets` and ensure strong secret generation.
- Refactor network configuration handling to improve error reporting and validation.

This change enhances security by requiring a secret for each network code, ensuring that only authorized networks can register. It also improves the configuration management by validating the presence and strength of secrets, preventing misconfigurations that could lead to security vulnerabilities.
- Update README files to reflect correct sample config path
- Add 'secret' field to network structures and database
- Modify network management functions to handle secrets
- Enhance UI to allow input and display of network secrets

This commit introduces a new feature for managing network secrets, which improves security by requiring a secret for each network. The documentation has been updated to guide users on the new configuration requirements. Additionally, the UI has been enhanced to support the input and display of network secrets, ensuring a better user experience.
- Adjust indentation and line breaks for better readability
- Reorganize imports and function parameters for consistency
- Ensure consistent use of method chaining and formatting

These changes enhance the overall code quality and maintainability without altering any functionality. The refactoring focuses on improving the visual structure of the code, making it easier to navigate and understand.
- Create a new example configuration file for the application.
- Define listener addresses for TCP, QUIC, and WebSocket protocols.
- Include optional settings for allow-list, lease duration, and web admin UI.
- Provide placeholders for SQLite persistence and bootstrap networks.

This commit introduces a sample configuration file that helps users
set up the application with default settings. It includes comments
for guidance on modifying the configuration as needed.
@cg8-5712
Copy link
Copy Markdown
Author

All features test pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants